package ua.com.abakumov.android.prostopleer.engines.u

import android.os.AsyncTask
import ua.com.abakumov.android.prostopleer.util.Composition

/**
 *
 * User: aabakumov, Date: 24.12.12, Time: 14:03 
 */
class AsyncSearchRunner(private val logic: Searcher) {

  private val runner = new AsyncTask[String, String, List[Composition]] {
    protected def doInBackground(params: String*): List[Composition] = {
      logic.search(params(0))
    }
  }

  def search(r: String) {
    runner.execute(r)
  }

}
